package day07HomeWork;/*
Student、Teacher、Doctor类和Test类
Person类：name、age、address、Person(参)、eat()、sleep()，sayHi()
Student类：继承Person、className、stuId，Student(参)、study()，重写sayHi()方法
Teacher类：继承Person、salary，Teacher(参)、teach()，重写sayHi()方法
Doctor类：继承Person、title，Doctor(参)、cut()
Test：创建对象、调用方法测试*/

public class Teacher extends Person {
    int salary;

    Teacher() {

    }

    Teacher(String name, int age, String address, int salary) {
        super(name, age, address);
        this.salary = salary;
    }

    void teach() {
        System.out.println(name + "正在讲课...");
    }

    void sayHi() {
        System.out.println("大家好，我叫" + name + "，今年" + age + "岁了，" + "家住" + address);
    }
}
